from typing import Protocol

from src.core.models.dto import UserDTO
from src.domain.user import UserEntity


class UserRepo(Protocol):
    async def acquire_user_by_id(self, user_id: int) -> UserEntity:
        raise NotImplementedError

    async def acquire_user_by_tg_id(self, user_tg_id: int) -> UserEntity:
        raise NotImplementedError

    async def create_user(self, user: UserEntity) -> None:
        raise NotImplementedError

    async def update_user(self, user: UserEntity) -> None:
        raise NotImplementedError


class UserReader(Protocol):
    async def get_user_by_id(self, user_id: int) -> UserDTO:
        raise NotImplementedError

    async def get_user_by_tg_id(self, user_tg_id: int) -> UserDTO:
        raise NotImplementedError
